/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mygraph;

/**
 *
 * @author sara
 */
public class Square extends Circle{

    public Square(int r) {
        super(r);
    }

    /**
     *
     * @return
     */
    @Override
    public double area()
    {
        return r*r;
    }
    public double circum()
    {
        return r*4;
    }
    @Override
    public String toString()
    {
        return "Square{" + "width=" + r + '}'+ "\narea:"+this.area()+"\ncircum:"+this.circum() ;
    }

    
}
